<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let second = +prompt('请输入总秒数：')
        function fn(t){
            if(t <=0){
                alert('请输入大于0的秒数')
                return
            }
            let h = parseInt(t/60/60%24)
            let m = parseInt(t/60%60)
            let s = parseInt(t%60)
            h = h < 10? '0'+h:h
            m = m < 10? '0'+m:m
            s = s < 10? '0'+s:s
            return `转换回来的时间：${h}时${m}分${s}秒`
        }
        document.write(fn(second))
    </script>
</body>
</html>